home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / LIB / DESK / CORE / Desk / h / Save < prev    next >
Text File  |  1996-05-21  |  2KB  |  79 lines

  1.  
  2. #ifndef __Desk_Save_h
  3. #define __Desk_Save_h
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #include <stdlib.h>
  8. #ifndef __Desk_Event_h
  9. #include "Desk.Event.h"
  10. #endif
  11. typedef Desk_bool (*Desk_save_filesaver)(char *f, void *ref);
  12. typedef int (*Desk_save_ramsaver)(
  13. Desk_task_handle sourcetask, 
  14. void *ref,
  15. Desk_task_handle desttask,
  16. void *destbuffer,
  17. unsigned int buffersize,
  18. int progress 
  19. );
  20. typedef enum
  21. {
  22. Desk_save_SAVEOK = 0,
  23. Desk_save_RECEIVERFAILED,
  24. Desk_save_FILESAVERFAILED,
  25. Desk_save_RAMSAVERFAILED
  26. } Desk_save_result;
  27. typedef void (*Desk_save_resulthandler)(Desk_save_result result, void *ref);
  28. typedef struct
  29. {
  30. Desk_window_handle window; 
  31. union
  32. {
  33. unsigned int value;
  34. struct
  35. {
  36. unsigned int Desk_is_menu : 1; 
  37. unsigned int Desk_is_save_window : 1; 
  38. unsigned int Desk_we_are_dragging : 1; 
  39. unsigned int Desk_quit_after_save : 1; 
  40. unsigned int Desk_release_after : 1; 
  41. unsigned int padding : 27;
  42. } data;
  43. } flags;
  44. Desk_icon_handle dragsprite;
  45. Desk_icon_handle okbutton;
  46. Desk_icon_handle cancelbutton;
  47. Desk_icon_handle filenameicon;
  48. Desk_save_filesaver filesaver;
  49. Desk_save_ramsaver ramsaver;
  50. Desk_save_resulthandler resulthandler;
  51. size_t estimatedsize;
  52. int filetype;
  53. void *ref;
  54. int Desk_ram_progress; 
  55. unsigned int Desk_last_message_ref; 
  56. } Desk_save_saveblock;
  57. Desk_save_saveblock *Desk_Save_InitSaveWindowHandler(
  58. Desk_window_handle window, 
  59. Desk_bool Desk_is_menu, 
  60. Desk_bool Desk_is_save_window, 
  61. Desk_bool Desk_release_after, 
  62. Desk_icon_handle dragsprite, 
  63. Desk_icon_handle okbutton, 
  64. Desk_icon_handle cancelbutton, 
  65. Desk_icon_handle filenameicon, 
  66. Desk_save_filesaver filesaver, 
  67. Desk_save_ramsaver ramsaver, 
  68. Desk_save_resulthandler resulthandler, 
  69. size_t estimatedsize, 
  70. int filetype,
  71. void *ref 
  72. );
  73. void Desk_Save_ReleaseSaveHandlers(Desk_save_saveblock *saveblock);
  74. void Desk_Save_SetFiletype(Desk_save_saveblock *saveblock, int filetype);
  75. #ifdef __cplusplus
  76. }
  77. #endif
  78. #endif
  79.